Skip to content

plot: Fix the description of the -M option#9064

Merged
seisman merged 1 commit into
masterfrom
doc/plot-M
Jun 16, 2026
Merged

plot: Fix the description of the -M option#9064
seisman merged 1 commit into
masterfrom
doc/plot-M

Conversation

@seisman

@seisman seisman commented Jun 14, 2026

Copy link
Copy Markdown
Member

In plot -M, when +p modifier is not set, it defaults to not drawing the curve, but the docs say

Specify a separate pen for drawing curve :math:y_1(x) [Default is same pen as :math:y_0(x)]. See |-W| for specifying the pen for curve :math:y_0(x).

The behavior can be confirmed by the following script:

#!/usr/bin/env bash
# Demonstrate filling of area between two sinusoidal curves with a section of NaNs
gmt begin GMT_fill_curves
	gmt math -T0/720/5 -N3/0 T -C1 COSD -C2 3 MUL SIND 4 DIV -C1,2 1 T 200 250 INRANGE SUB 0 NAN MUL = both_NaN.txt
	gmt plot -Mc+gblue+r+l"Short @~l@~ exceeds long" -Bxa90g90+u@. -Byafg -BWStr -JX15c/3c -R0/720/-1.25/2.5 both_NaN.txt -Gred -l"Long @~l@~ exceeds short" -W1p,red
gmt end show

Comment thread doc/rst/source/plot.rst
.. _-M:

**-M**\ [**c**\|\ **s**][**+l**\ *seclabel*][**+g**\ *fill*][**p**\ *pen*][**+r**\ *pen*][**+y**\ [*level*]]
**-M**\ [**c**\|\ **s**][**+l**\ *seclabel*][**+g**\ *fill*][**+p**\ *pen*][**+r**\ *pen*][**+y**\ [*level*]]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@seisman seisman merged commit c12983f into master Jun 16, 2026
2 checks passed
@seisman seisman deleted the doc/plot-M branch June 16, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants